package cn.com.dhcc.adam.spring.mvc.five;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AOPTest {

	public static void main(String[] args) {
		String configUrl = "springcontainer/aspect.xml";
		// 创建 Spring 容器
		ApplicationContext ctx = new ClassPathXmlApplicationContext(configUrl);
		UserService u = ctx.getBean("userService", UserService.class);
		System.out.println(u.getUserInfo());
		((ClassPathXmlApplicationContext)ctx).close();
		System.out.println(u.des());
	}
}
